// uno.config.ts
import {
	defineConfig,
	presetAttributify,
	presetIcons,
	presetTypography,
	presetUno,
	presetWebFonts,
	transformerDirectives,
	transformerVariantGroup,
} from "unocss";

export default defineConfig({
	shortcuts: {
		"flex-center": "flex justify-center items-center",
		"flex-x-center": "flex justify-center",
		"flex-y-center": "flex items-center",
		"wh-full": "w-full h-full",
		"flex-x-between": "flex items-center justify-between",
		"flex-x-end": "flex items-center justify-end",
		"absolute-lt": "absolute left-0 top-0",
		"absolute-rt": "absolute right-0 top-0 ",
		"fixed-lt": "fixed left-0 top-0",
	},
	theme: {
		colors: {
			primary: "var(--el-color-primary)",
			primary_dark: "var(--el-color-primary-light-5)",
		},
	},
	//预设包地址：https://unocss.nodejs.cn/presets/
	presets: [
		//默认预设
		presetUno(),
		//为其他规则启用属性化模式
		presetAttributify(),
		//Iconify 提供支持的纯 CSS 图标解决方案
		presetIcons(),
		//排版预设
		presetTypography(),
		presetWebFonts({
			fonts: {
				// ...
			},
		}),
	],
	transformers: [
		//CSS 指令（如 @apply）的转换器
		transformerDirectives(),
		//	Windi CSS 变体组功能的转换器
		transformerVariantGroup(),
	],
});
